//
//  LHCountryHomePageTableViewCell.m
//  Knight_Tour
//
//  Created by Bruce_Lin on 15/5/14.
//  Copyright (c) 2015年 TouchOne. All rights reserved.
//

#import "LHCountryHomePageTableViewCell.h"

@interface LHCountryHomePageTableViewCell ()
@property (nonatomic ,retain)UIImageView *back1;
@property (nonatomic ,retain)UIImageView *back2;
@end

@implementation LHCountryHomePageTableViewCell

- (void)dealloc
{
    [_back1 release];
    [_back2 release];
    [_myImageView release];
    [_introduceLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.myImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        
        self.back1 = [[UIImageView alloc]init];
        [self.myImageView addSubview:_back1];
        [_back1 release];
        
        self.introduceLabel = [[UILabel alloc]init];
        [self.myImageView addSubview:_introduceLabel];
        _introduceLabel.textColor = [UIColor whiteColor];
        [_introduceLabel release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [self.myImageView setFrame:CGRectMake(0, 0, self.frame.size.width, LHheight / 4)];
    
    [self.introduceLabel setFrame:CGRectMake(0, self.myImageView.frame.size.height - 20, self.frame.size.width, 20)];
    
    [self.back1 setFrame:CGRectMake(0, self.myImageView.frame.size.height - 20, self.frame.size.width, 20)];
    _back1.backgroundColor = [UIColor colorWithRed:0.335 green:0.338 blue:0.348 alpha:1.000];
    _back1.alpha = 0.7;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
